import React from 'react';
import {
    Routes,
    Route
} from "react-router-dom";
import GoodsDetails from "./pages/GoodsDetails";
import NewsDetails from "./pages/NewsDetails";
import Login from "./pages/Login";
import NotFound from "./pages/NotFound";
import "./App.css"
import Index from "./pages/Index";
import NewsList from "./pages/NewsList";
import GoodsList from "./pages/GoodsList";
import My from "./pages/My";
import Home from "./pages/Home";

function App(props) {
    return (
        <div className={"container"}>
            {/*http://localhost:3000/newsList*/}
            <Routes>
                <Route path={"/"} element={<Index/>}>
                    <Route path={"newsList"} element={<NewsList/>}></Route>
                    <Route path={"goodsList"} element={<GoodsList/>}></Route>
                    <Route path={"my"} element={<My/>}></Route>
                    <Route index element={<Home/>}></Route>
                </Route>
                <Route path={"/goodsDetails"} element={<GoodsDetails/>}></Route>
                <Route path={"/newsDetails"} element={<NewsDetails/>}></Route>
                <Route path={"/Login"} element={<Login/>}></Route>
                <Route path={"*"} element={<NotFound/>}></Route>
            </Routes>
        </div>
    );
}

export default App;